﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OSA.Policlinic.BusinessApplication.Registry;
using Policlinica;
using NLog;

namespace OSA.Policlinic.UI.WFApplication
{
    public partial class TicketView : Form
    {
        private Doctor doctor;
        private List<Ticket> tickets;
        private IRegistryBusinessApplication registryBusinessApplication;
        private static Logger logger = LogManager.GetCurrentClassLogger();

        public TicketView(Doctor doctor)
        {
            InitializeComponent();
            this.doctor = doctor;
            registryBusinessApplication = new RegistryBusinessApplication();
            tickets = registryBusinessApplication.GetTicketsByDoctor(doctor);
            TicketBindingSource.DataSource = tickets;
            logger.Trace("Форма TicketView успешно инициализирована");
        }
    }
}
